﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_SiteMasterPage/Site.Master"
    AutoEventWireup="true" CodeBehind="PlanesManagementEdit.aspx.cs" Inherits="eProject.Web.UI.Admin.PlanesManagementEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="script" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="LeftContent" runat="server">
    <div id="widget-categories" class="widget widget-categories">
        <div class="widget-inner">
            <div class="widget-title">
                <h5>
                    Planes</h5>
            </div>
            <div class="widget-content">
                <ul>
                    <li><a class="add" href="PlanesManagementAddNew.aspx">Add New</a></li>
                    <li><a href="PlanesManagementProgram.aspx">List Planes</a></li>
                </ul>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="RightContent" runat="server">
    <div class="widget">
        <div class="widget-inner">
            <div class="widget-title">
                <h5>
                    Plane Edit
                </h5>
            </div>
            <div class="widget-content">
                <div class="frm">
                    <div id="tabs">
                        <ul>
                            <li><a href="#tabs-1">Plane Info</a></li>
                            <li><a href="#tabs-2">Seat</a></li>
                        </ul>
                        <div id="tabs-1">
                            <!--[if lt IE 9]><div class="ie"><![endif]-->
                            <asp:ValidationSummary ID="vsSumary" ValidationGroup="Insert" runat="server" CssClass="frmValidation" />
                            <fieldset>
                                <dl>
                                    <dt>
                                        <label>
                                            Plane Code:</label><br />
                                        <span>Please insert code of Plane</span> </dt>
                                    <dd>
                                        <asp:TextBox ID="txtPlaneCode" runat="server" Width="190px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvtxtPlaneCode" ControlToValidate="txtPlaneCode"
                                            runat="server" ErrorMessage="Plane code is empty" Text="*" ValidationGroup="Insert"></asp:RequiredFieldValidator>
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>
                                        <label>
                                            Plane Name:</label><br />
                                        <span>Please insert Plane Name</span> </dt>
                                    <dd>
                                        <asp:TextBox ID="txtPlaneName" runat="server" Width="190px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvtxtPlaneName" ControlToValidate="txtPlaneName"
                                            runat="server" ErrorMessage="Plane name is empty" ValidationGroup="Insert" Text="*"></asp:RequiredFieldValidator>
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>
                                        <label>
                                            Company Name :</label><br />
                                        <span>Choose one company</span> </dt>
                                    <dd>
                                        <asp:DropDownList ID="ddlCompany" runat="server" Width="200px">
                                        </asp:DropDownList>
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>
                                        <label>
                                            Created Date :</label><br />
                                        <span></span></dt>
                                    <dd>
                                        <asp:Label ID="lblCreateDate" runat="server"></asp:Label>
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>
                                        <label>
                                            Last Update :</label><br />
                                        <span></span></dt>
                                    <dd>
                                        <asp:Label ID="lblLastUpdate" runat="server"></asp:Label>
                                    </dd>
                                </dl>
                            </fieldset>
                            <fieldset class="div-button">
                                <div>
                                    <input class="btn button1" name="btn_submit" value="Save" type="submit" runat="server"
                                        id="btnSubmit" validationgroup="Insert" />
                                    <input class="btn button2" name="btn_cancel" value="Reset" type="reset" runat="server"
                                        id="btnReset" />
                                </div>
                            </fieldset>
                            <!--[if lt IE 9]></div><![endif]-->
                        </div>
                        <div id="tabs-2">
                            <asp:ValidationSummary ID="ValidationSummary1" ValidationGroup="InsertSeat" runat="server"
                                CssClass="frmValidation" />
                            <fieldset>
                                <dl>
                                    <dt>
                                        <label>
                                            Seat type:</label></dt>
                                    <dd>
                                        <asp:DropDownList ID="ddlSeatType" DataTextField="SeatName" DataValueField="Id" runat="server" />
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>
                                        <label>
                                            Total Seat:</label></dt>
                                    <dd>
                                        <asp:TextBox ID="txtTotalSeat" runat="server" Width="190px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvTotalSeat" CssClass="txtError" ControlToValidate="txtTotalSeat" runat="server"
                                            ErrorMessage="Seat is empty" Text="*" Display="Dynamic" ValidationGroup="InsertSeat" />
                                        <asp:RegularExpressionValidator ID="revTotalSeat" CssClass="txtError" runat="server" Text="*" Display="Dynamic"
                                            ValidationGroup="InsertSeat" ControlToValidate="txtTotalSeat" ValidationExpression="[0-9]+"
                                            ErrorMessage="Input integer" />
                                    </dd>
                                </dl>
                            </fieldset>
                            <fieldset class="div-button">
                                <div>
                                    <input class="btn button1" name="btn_submit" value="Save" type="submit" runat="server"
                                        id="btnInsertSeat" validationgroup="InsertSeat" />
                                    <input class="btn button2" name="btn_cancel" value="Reset" type="reset" runat="server"
                                        id="btnResetSeat" />
                                </div>
                            </fieldset>
                            <fieldset class="div-button">
                                <div>
                                    <asp:GridView ID="grvSeat" runat="server" CssClass="tbStyles" AllowPaging="True"
                                        DataKeyNames="Id" AutoGenerateColumns="False" EmptyDataText="You dont have any seat!">
                                        <Columns>
                                            <asp:TemplateField HeaderText="Seat Type">
                                                <ItemTemplate>
                                                    <asp:Literal ID="SeatClassId" Text='<%# GetSeatType(Eval("SeatClassId")) %>' runat="server" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="TotalSeat" HeaderText="Toal Seat" />
                                            <asp:TemplateField HeaderText="Delete">
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="btnDeleteSeat" runat="server" CausesValidation="False" CommandName="delete"
                                                        ImageUrl="~/Images/Icons/delete.png" />
                                                </ItemTemplate>
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </fieldset>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {

            $('#tabs').tabs();
        });
    </script>
</asp:Content>
